<template>
    <div class="zsdx-produces">
        <div class="section">
            <div
                class="section-modules-title"
                style="margin-top: 0.8rem;margin-bottom: 0.4rem;"
            >
                核心功能与服务
            </div>

            <div class="products-list">
                <div
                    v-for="(item, index) in productList"
                    :key="index"
                    class="product-item"
                    :style="'background-image: url(' + item.bgUrl + ')'"
                >
                    <div class="product-left">
                        <p class="product-title">{{ item.name }}</p>
                        <p class="product-info">
                            {{ item.desc }}
                        </p>

                        <div v-if="item.id === 1" class="qr-container">
                            <div class="qr-image">
                                <img
                                    src="//cdn.zsdx.cn/zsdx-website/2020/images/common/downloadQRCode.png"
                                    alt=""
                                />
                            </div>
                            <p class="qr-title">扫码下载</p>
                        </div>

                        <div
                            v-if="item.id === 2"
                            class="view-more-btn"
                            @click="fnGoWapResource"
                        >
                            查看详情
                        </div>
                    </div>
                    <!-- <div
                        class="product-right"
                        :style="'background-image: url(' + item.rightUrl + ')'"
                    ></div> -->
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'ZsdxProduces',
    data() {
        return {
            productList: [
                {
                    id: 1,
                    name: '掌上大学APP',
                    desc: '企业的校园事业部,让全球在校大学生成为精英的互动平台',
                    bgUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/bg_index_1.png',
                    rightUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/product_right_1.png'
                },
                {
                    id: 2,
                    name: '媒体系统',
                    desc: '全国2400所高校媒介资源，行业成本价投放',
                    bgUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/bg_index_2.png',
                    rightUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/product_right_2.png'
                },
                {
                    id: 3,
                    name: '覆盖近10万校园KOL',
                    desc: '每个商品都会有很多的学生成为代理进行销售',
                    bgUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/bg_index_3.png',
                    rightUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/product_right_3.png'
                },
                {
                    id: 4,
                    name: '大学生用户3000万+',
                    desc: '覆盖广  数量多  数据全',
                    bgUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/bg_index_4.png',
                    rightUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/product_right_4.png'
                },
                {
                    id: 5,
                    name: '校园节日主题活动',
                    desc: '商城不定时的举行各种校园节日活动',
                    bgUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/bg_index_5.png',
                    rightUrl:
                        '//cdn.zsdx.cn/zsdx-website/2020mobile/images/product_right_5.png'
                }
            ]
        }
    },
    methods: {
        fnGoWapResource() {
            window.location.href = '//m.resource.zsdx.cn/#/'
        }
    }
}
</script>

<style lang="less" scoped>
.products-list {
    .product-item {
        width: 7.02rem;
        height: 4.6rem;
        margin: 0 auto;
        display: flex;
        align-items: center;
        padding-left: 0.2rem;
        margin-bottom: 0.4rem;
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        .product-left {
            width: 3.2rem;
            .product-title {
                font-size: 0.32rem;
                font-weight: 500;
                color: rgba(255, 255, 255, 1);
                margin-bottom: 0.28rem;
                word-break: keep-all;
            }
            .product-info {
                font-size: 0.24rem;
                font-weight: 400;
                color: rgba(255, 255, 255, 1);
                line-height: 0.36rem;
                width: 2.8rem;
            }
            .qr-container {
                margin-top: 0.56rem;
                .qr-image {
                    width: 0.96rem;
                    height: 0.96rem;
                    img {
                        width: 100%;
                        height: 100%;
                    }
                }
                .qr-title {
                    font-size: 0.18rem;
                    font-weight: 400;
                    color: rgba(255, 255, 255, 1);
                    line-height: 0.18rem;
                    margin-top: 0.2rem;
                }
            }
            .view-more-btn {
                width: 1.64rem;
                height: 0.56rem;
                background: rgba(255, 255, 255, 0.7);
                border-radius: 0.36rem;
                display: flex;
                justify-content: center;
                align-items: center;
                margin-top: 0.28rem;
            }
        }
        .product-right {
            width: 4.52rem;
            height: 4.12rem;
            background-position: right;
            background-size: 100%;
            background-repeat: no-repeat;
        }
    }
}
</style>
